package com.hd.pzhwlxt.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hd.pzhwlxt.mapper.DepartmentMapper;
import com.hd.pzhwlxt.pojo.Department;
import com.hd.pzhwlxt.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
@create: 2022-09-21 9:00
@author: 怀念天空
@Description: 
*/

@Service
public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Department> implements DepartmentService{

    @Autowired
    private DepartmentMapper departmentMapper;
    @Override
    public Department getDeptByName(String dName) {
        QueryWrapper<Department> wrapper = new QueryWrapper<>();
        wrapper.eq("dept_name", dName);
        return departmentMapper.selectOne(wrapper);
    }
}
